define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'order.price_difference/index',
        add_url: 'order.price_difference/add',
        edit_url: 'order.price_difference/edit',
        delete_url: 'order.price_difference/delete',
        export_url: 'order.price_difference/export',
        modify_url: 'order.price_difference/modify',
    };

    var Controller = {

        index: function () {
            ea.table.render({
                init: init,
                toolbar: ['refresh'],
                cols: [[
                    {field: 'id', title: 'id',search: false},
                    {field: 'nickname', title: '支付用户',search: false},
                    {field: 'service_name', title: '达人',search: false},
                    {field: 'sub_order_no', title: '订单号'},
                    {field: 'reward_money', title: '打赏金额',search: false},
                    {field: 'create_time', title: '打赏时间',search: false},
                    {field: 'pay_time', title: '支付时间',search: false},
                    {field: 'status', title: '状态',selectList: {0: '待支付',1: '已支付'}},
                    //{width: 250, title: '操作', templet: ea.table.tool},

                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
    return Controller;
});